package controllers

import (
	"github.com/goravel/framework/contracts/http"
	httpfacade "github.com/hulutech-web/http_result"
	"goravel/app/services/deepseek"
)

type DeepseekController struct {
	// Dependent services
	client *deepseek.DeepseekClient
}

func NewDeepseekController() *DeepseekController {
	dp_service := deepseek.NewDeepseekClient()
	return &DeepseekController{
		// Inject services
		client: dp_service,
	}
}

func (r *DeepseekController) Chat(ctx http.Context) http.Response {
	content := ctx.Request().Input("content")
	r.client.Chat(content)
	return httpfacade.NewResult(ctx).Success("请等待...", nil)
}
